/**
 * Created by 浩容 on 2016/9/24.
 */
import java.util.Scanner;
public class main {
    public static void main(String[] args) {
        // write your code here
        int a = 5;
        int b = 3*a;
        int c = 1;
        int d = 2;
        double m = 3.3;
        double n= 1.3;
        System.out.print(a);//test print
        System.out.println(a);
        System.out.println(a*b);//test println
        System.out.printf("c+d =%5d\n", c + d);//Control the output format
        System.out.printf("m-n =%7.4f\n", m-n);



        Scanner input = new Scanner(System.in);//create a scanner object
        System.out.println("Type a integer: ");
        int e = input.nextInt();//using nextInt
        System.out.println(e);
        System.out.println("Type a double number: ");
        double f = input.nextDouble();//using nextDouble
        System.out.println(f);

        while(input.hasNext()){//using hasNext
            System.out.println("test");
            break;
        }
        input.close();

        Scanner inputTest = new Scanner(System.in);//create a scanner object to test close()
        inputTest.close();
        int TestNum =inputTest.nextInt();
        //System.out.println(TestNum);  Error

    }
}
